package com.qj.yantaishan.domain;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.qj.yantaishan.common.annotation.Excel;
import com.qj.yantaishan.common.core.domain.BaseEntity;

/**
 * 优惠券对象 shanglala_coupon
 *
 * @author qihe
 * @date 2022-07-22
 */
public class Coupon {
    private static final long serialVersionUID = 1L;

    public String getCouponToProductIds() {
        return couponToProductIds;
    }

    public void setCouponToProductIds(String couponToProductIds) {
        this.couponToProductIds = couponToProductIds;
    }

    /**
     * $column.columnComment
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long uid;

    /**
     * 商铺id
     */
    @Excel(name = "商铺id")
    private Long storeId;

    /**
     * 优惠券名称
     */
    @Excel(name = "优惠券名称")
    private String name;

    /**
     * 优惠券面值(起始)
     */
    @Excel(name = "优惠券面值(起始)")
    private BigDecimal faceMoney;

    /**
     * 使用优惠券的订单金额下限（为0：为不限定）
     */
    @Excel(name = "使用优惠券的订单金额下限", readConverterExp = "为=0：为不限定")
    private BigDecimal limitMoney;

    /**
     * 单人最多拥有优惠券数量（0：不限制）
     */
    @Excel(name = "单人最多拥有优惠券数量", readConverterExp = "0=：不限制")
    private Long mostHave;

    /**
     * 发放总量
     */
    @Excel(name = "发放总量")
    private Long totalAmount;

    /**
     * 生效时间
     */
    @Excel(name = "生效时间")
    private Long startTime;

    /**
     * 过期时间
     */
    @Excel(name = "过期时间")
    private Long endTime;

    /**
     * 到期提醒（0：不提醒；1：提醒）
     */
    @Excel(name = "到期提醒", readConverterExp = "0=：不提醒；1：提醒")
    private Integer isExpireNotice;

    /**
     * 是否允许分享链接（0：不允许；1：允许）
     */
    @Excel(name = "是否允许分享链接", readConverterExp = "0=：不允许；1：允许")
    private Integer isShare;

    /**
     * 是否全店通用（0：全店通用；1：指定商品使用;3:全平台通用）
     */
    @Excel(name = "是否全店通用", readConverterExp = "0=：全店通用；1：指定商品使用;3:全平台通用")
    private Integer isAllProduct;

    /**
     * 0:非原价购买可使用；1：原价购买商品时可
     */
    @Excel(name = "0:非原价购买可使用；1：原价购买商品时可")
    private Integer isOriginalPrice;

    /**
     * 添加优惠券的时间
     */
    @Excel(name = "添加优惠券的时间")
    private Long timestamp;

    /**
     * 使用说明
     */
    @Excel(name = "使用说明")
    private String description;

    /**
     * 已使用数量
     */
    @Excel(name = "已使用数量")
    private Long usedNumber;

    /**
     * 已领取数量
     */
    @Excel(name = "已领取数量")
    private Long number;

    /**
     * 是否失效（0：失效；1：未失效）
     */
    @Excel(name = "是否失效", readConverterExp = "0=：失效；1：未失效")
    private Integer status;

    /**
     * 券类型（1：优惠券； 2:赠送券）
     */
    @Excel(name = "券类型", readConverterExp = "1=：优惠券；,2=:赠送券")
    private Integer type;

    /**
     * 是否售卖1是0否
     */
    @Excel(name = "是否售卖1是0否")
    private Integer sold;

    /**
     * 微信卡券所对应的card_id
     */
    @Excel(name = "微信卡券所对应的card_id")
    private String cardId;

    /**
     * 优惠券关联门店,json中元素-1,代表不限制门店,其他元素代表响应门店
     */
    @Excel(name = "优惠券关联门店,json中元素-1,代表不限制门店,其他元素代表响应门店")
    private String selectPhysical;

    /**
     * 有效时间类型,1代表固定区间,0代表固定时长
     */
    @Excel(name = "有效时间类型,1代表固定区间,0代表固定时长")
    private Integer valueType;

    /**
     * 领取优惠券后多少天生效
     */
    @Excel(name = "领取优惠券后多少天生效")
    private Integer lateBegin;

    /**
     * 领取优惠券并生效后有效期
     */
    @Excel(name = "领取优惠券并生效后有效期")
    private Integer lateValue;

    /**
     * 可用时段,星期
     */
    @Excel(name = "可用时段,星期")
    private String weeklimit;

    /**
     * 0未删除,1已删除
     */
    @Excel(name = "0未删除,1已删除")
    private Integer deleteFlg;

    /**
     * 1 公开券(赠送或用户领券) 0 隐藏券(商家主动发券)
     */
    @Excel(name = "1 公开券(赠送或用户领券) 0 隐藏券(商家主动发券)")
    private Integer publicShow;

    /**
     * 是否开启平台首页弹窗推送显示 0 关闭 1开启
     */
    @Excel(name = "是否开启平台首页弹窗推送显示 0 关闭 1开启")
    private Integer isOpenRecommend;
    //优惠券可使用的商品
    @TableField(exist = false)
    public String couponToProductIds;
    //商品列表
    @TableField(exist = false)
    List<Map<String, Object>> couponToProductList;

    public List<Map<String, Object>> getCouponToProductList() {
        return couponToProductList;
    }

    public void setCouponToProductList(List<Map<String, Object>> couponToProductList) {
        this.couponToProductList = couponToProductList;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public Long getUid() {
        return uid;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public Long getStoreId() {
        return storeId;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setFaceMoney(BigDecimal faceMoney) {
        this.faceMoney = faceMoney;
    }

    public BigDecimal getFaceMoney() {
        return faceMoney;
    }

    public void setLimitMoney(BigDecimal limitMoney) {
        this.limitMoney = limitMoney;
    }

    public BigDecimal getLimitMoney() {
        return limitMoney;
    }

    public void setMostHave(Long mostHave) {
        this.mostHave = mostHave;
    }

    public Long getMostHave() {
        return mostHave;
    }

    public void setTotalAmount(Long totalAmount) {
        this.totalAmount = totalAmount;
    }

    public Long getTotalAmount() {
        return totalAmount;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public Long getStartTime() {
        return startTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setIsExpireNotice(Integer isExpireNotice) {
        this.isExpireNotice = isExpireNotice;
    }

    public Integer getIsExpireNotice() {
        return isExpireNotice;
    }

    public void setIsShare(Integer isShare) {
        this.isShare = isShare;
    }

    public Integer getIsShare() {
        return isShare;
    }

    public void setIsAllProduct(Integer isAllProduct) {
        this.isAllProduct = isAllProduct;
    }

    public Integer getIsAllProduct() {
        return isAllProduct;
    }

    public void setIsOriginalPrice(Integer isOriginalPrice) {
        this.isOriginalPrice = isOriginalPrice;
    }

    public Integer getIsOriginalPrice() {
        return isOriginalPrice;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }

    public Long getTimestamp() {
        return timestamp;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public void setUsedNumber(Long usedNumber) {
        this.usedNumber = usedNumber;
    }

    public Long getUsedNumber() {
        return usedNumber;
    }

    public void setNumber(Long number) {
        this.number = number;
    }

    public Long getNumber() {
        return number;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getType() {
        return type;
    }

    public void setSold(Integer sold) {
        this.sold = sold;
    }

    public Integer getSold() {
        return sold;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getCardId() {
        return cardId;
    }

    public void setSelectPhysical(String selectPhysical) {
        this.selectPhysical = selectPhysical;
    }

    public String getSelectPhysical() {
        return selectPhysical;
    }

    public void setValueType(Integer valueType) {
        this.valueType = valueType;
    }

    public Integer getValueType() {
        return valueType;
    }

    public void setLateBegin(Integer lateBegin) {
        this.lateBegin = lateBegin;
    }

    public Integer getLateBegin() {
        return lateBegin;
    }

    public void setLateValue(Integer lateValue) {
        this.lateValue = lateValue;
    }

    public Integer getLateValue() {
        return lateValue;
    }

    public void setWeeklimit(String weeklimit) {
        this.weeklimit = weeklimit;
    }

    public String getWeeklimit() {
        return weeklimit;
    }

    public void setDeleteFlg(Integer deleteFlg) {
        this.deleteFlg = deleteFlg;
    }

    public Integer getDeleteFlg() {
        return deleteFlg;
    }

    public void setPublicShow(Integer publicShow) {
        this.publicShow = publicShow;
    }

    public Integer getPublicShow() {
        return publicShow;
    }

    public void setIsOpenRecommend(Integer isOpenRecommend) {
        this.isOpenRecommend = isOpenRecommend;
    }

    public Integer getIsOpenRecommend() {
        return isOpenRecommend;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("uid", getUid())
                .append("storeId", getStoreId())
                .append("name", getName())
                .append("faceMoney", getFaceMoney())
                .append("limitMoney", getLimitMoney())
                .append("mostHave", getMostHave())
                .append("totalAmount", getTotalAmount())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("isExpireNotice", getIsExpireNotice())
                .append("isShare", getIsShare())
                .append("isAllProduct", getIsAllProduct())
                .append("isOriginalPrice", getIsOriginalPrice())
                .append("timestamp", getTimestamp())
                .append("description", getDescription())
                .append("usedNumber", getUsedNumber())
                .append("number", getNumber())
                .append("status", getStatus())
                .append("type", getType())
                .append("sold", getSold())
                .append("cardId", getCardId())
                .append("selectPhysical", getSelectPhysical())
                .append("valueType", getValueType())
                .append("lateBegin", getLateBegin())
                .append("lateValue", getLateValue())
                .append("weeklimit", getWeeklimit())
                .append("deleteFlg", getDeleteFlg())
                .append("publicShow", getPublicShow())
                .append("isOpenRecommend", getIsOpenRecommend())
                .toString();
    }
}
